﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Marbles.Core.Web.Controls
{
    [ParseChildren(typeof(Toolbar)), ToolboxData("<{0}:ToolStrip runat=server></{0}:ToolStrip>")]
    public class ToolStrip : WebControl, INamingContainer, IPostBackDataHandler
    {
        [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), Browsable(false)]
        public ToolbarCollection Toolbars
        {
            get
            {
                return (ToolbarCollection)this.Controls;
            }
        }

        protected override void Render(HtmlTextWriter writer)
        {
            writer.AddAttribute("border", "0");
            writer.AddAttribute("cellspacing", "0");
            writer.AddAttribute("cellpadding", "0");
            writer.AddAttribute("class", this.CssClass);
            writer.RenderBeginTag(HtmlTextWriterTag.Table);
            writer.RenderBeginTag(HtmlTextWriterTag.Tr);
            writer.RenderBeginTag(HtmlTextWriterTag.Td);
            base.RenderChildren(writer);
            writer.AddStyleAttribute("width", "100%");
            writer.RenderBeginTag(HtmlTextWriterTag.Td);
            writer.RenderEndTag();
            writer.RenderEndTag();
            writer.RenderEndTag();
            writer.RenderEndTag();
        }

        public bool LoadPostData(string postDataKey, System.Collections.Specialized.NameValueCollection postCollection)
        {
            throw new NotImplementedException();
        }

        public void RaisePostDataChangedEvent()
        {
            throw new NotImplementedException();
        }

    }
}
